<template>
  <demoBlock title="基础用法" >
    <vcu-cell is-link title="文字提示" @click="Toast('提示语')" />
    <vcu-cell is-link title="加载提示" @click="showLoadingToast()" />
    <vcu-cell is-link title="成功提示" @click="showSuccessToast" />
    <vcu-cell is-link title="失败提示" @click="showFailToast" />
  </demoBlock>
</template>


<script setup lang="ts">
import { Toast } from "../../../components";
import { LoadingType } from "../../../components/loading";
const showLoadingToast = (loadingType?: LoadingType) => {
  Toast.loading({
    forbidClick: true,
    message: "加载中...",
    loadingType,
  });
};
const showSuccessToast = () => {
  Toast.success("成功了");
};

const showFailToast = () => {
  Toast.fail("失败了");
};
</script>